FROM maven:3.8.4-openjdk-17 AS build

RUN mkdir -p /app/Ocean-RS-Server/
RUN mkdir -p /opt/geoserver_data/
WORKDIR /app/Ocean-RS-Server/

COPY . /app/Ocean-RS-Server/
# COPY /app/Ocean-RS-Server/gis-server/target/gis-server-0.0.1-SNAPSHOT.jar /app/Ocean-RS-Server/Ocean-RS-Server-0.0.1-SNAPSHOT.jar
RUN command cp /app/Ocean-RS-Server/gis-server/target/gis-server-0.0.1-SNAPSHOT.jar /app/Ocean-RS-Server/Ocean-RS-Server-0.0.1-SNAPSHOT.jar

ENTRYPOINT ["java", "-jar", "/app/Ocean-RS-Server/Ocean-RS-Server-0.0.1-SNAPSHOT.jar"]

EXPOSE 8190 8090 80 443 